package com.cyq.stock.controller;

import com.cyq.stock.feign.StockFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private StockFeignService stockFeignService;

    @GetMapping("/add")
    public String add() {
        System.out.println("下单成功!");
        String s = stockFeignService.reduct2();
        return "Hello OpenFeign!" + s;
    }
}
